from datas import chinses_area
from datas.chinese_admini_divisions_dict import CitiesCode, ProvinceCode

# 获取行政区划编码
for name, code in ProvinceCode.items():
    print(name + ":" + code)
    for name2, code2 in CitiesCode.items():
        # print(code[0: 2])
        if code[0: 2] == code2[0: 2]:
            print("\t" + name2 + ":" + code2)
            for name3, code3 in chinses_area.Area.items():
                if code2[0: 4] == code3[0: 4] and code2 != code3:
                    print("\t\t" + name3 + ":" + code3)
